DR1='N:'
DR2='Q:'
F1='DOCTORS'
F2='DOCT_FE2'
docnam=space(12)
@ 10,40 clea to 23,78
@ 12,40 say "ENTER DOCTOR'S NAME :"
sele 1
set exclu off
use &dr1&f1
do while DOCNAM=SPACE(12)
   @ 12,62 get docnam  pict "@!"
   read
   loca for alltrim(doc_alias)=alltrim(docnam)
   if found()
      doccod=doc_code
      exit
   else
      @ 14, 50 say "Wrong Name ! Try Again"
      set cons off
      wait ' '
      set cons on
      return
   endif
   DOCNAM=SPACE(12)
enddo
store 0 to pl1,pl2,pl3,PAG,fl,hl,ttl,ttl1,totgrossi,totaxi,totneti,PROC,TOTFEE,TOTGROSS,TOTAX,totnet
do while pl1=0
   @ 12,60 say '/'
   @ 12,54 prompt 'Print'
   @ 12,62 prompt 'Quit'
   menu to pl1
   if pl1=2
      RETN=.T.
      return
   else
      @ 14,60 say '/'
      @ 14,46 prompt 'Printer Ready'
      @ 14,62 prompt 'Not Yet Ready'
      menu to pl2
      if pl2=2
         @ 14,46 clea to 14,78
         pl1=0
      else
         @ 16,46 say '        Printing...    '
         set console off
         set devi to prin
      endif
   endif
enddo
br=100
set devi to print
@ 0,0 say chr(15) pict 'x'
DOCW=LEN(TRIM(DOCNAM))
pract=practice_1
SELE 2
SET EXCLU OFF
USE &DR2&F2 INDEX &DR2&F2
go top
SEEK DOCCOD
MON=CMONTH(DATE_VISIT)
IF EOF()
   stor .f. to T&doccod
   SET DEVI TO SCREEN
   CLEAR
   CLOSE DATA
   CLOSE INDEX
   return
ELSE
   stor .t. to T&doccod
   do rdocpro
endif
SET DEVI TO SCREEN
CLOSE DATA
CLOSE INDEX
RETURN



